<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This manual describes GNU Stow version 2.3.1
(28 July 2019), a program for managing farms of symbolic links.

Software and documentation is copyrighted by the following:

(C) 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>


(C) 2000, 2001 Guillaume Morin <gmorin@gnu.org>


(C) 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>


(C) 2011 Adam Spiers <stow@adamspiers.org>

Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.


Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
section entitled "GNU General Public License" is included with the
modified manual, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
one.

Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Free Software Foundation. -->
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Resource Files (Stow)</title>

<meta name="description" content="Resource Files (Stow)">
<meta name="keywords" content="Resource Files (Stow)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Index.html#Index" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" rel="next" title="Compile-time vs Install-time">
<link href="Target-Maintenance.html#Target-Maintenance" rel="prev" title="Target Maintenance">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Resource-Files"></a>
<div class="header">
<p>
Next: <a href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" accesskey="n" rel="next">Compile-time vs Install-time</a>, Previous: <a href="Target-Maintenance.html#Target-Maintenance" accesskey="p" rel="prev">Target Maintenance</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Resource-Files-1"></a>
<h2 class="chapter">11 Resource Files</h2>
<a name="index-resource-files"></a>
<a name="index-configuration-files"></a>

<p>Default command line options may be set in <samp>.stowrc</samp> (current
directory) or <samp>~/.stowrc</samp> (home directory). These are parsed in
that order, and are appended together if they both exist. The effect of
the options in the resource file is similar to simply prepending the
options to the command line. This feature can be used for some
interesting effects.
</p>
<p>For example, suppose your site uses more than one stow directory, perhaps in
order to share around responsibilities with a number of systems
administrators. One of the administrators might have the following in their
<samp>~/.stowrc</samp> file:
</p>
<div class="example">
<pre class="example">--dir=/usr/local/stow2
--target=/usr/local
--ignore='~'
--ignore='^CVS'
</pre></div>

<p>so that the <code>stow</code> command will default to operating on the
<samp>/usr/local/stow2</samp> directory, with <samp>/usr/local</samp> as the
target, and ignoring vi backup files and CVS directories.
</p>
<p>If you had a stow directory <samp>/usr/local/stow/perl-extras</samp> that
was only used for Perl modules, then you might place the following in
<samp>/usr/local/stow/perl-extras/.stowrc</samp>:
</p>
<div class="example">
<pre class="example">--dir=/usr/local/stow/perl-extras
--target=/usr/local
--override=bin
--override=man
--ignore='perllocal\.pod'
--ignore='\.packlist'
--ignore='\.bs'
</pre></div>

<p>so that when you are in the <samp>/usr/local/stow/perl-extras</samp>
directory, <code>stow</code> will regard any subdirectories as stow
packages, with <samp>/usr/local</samp> as the target (rather than the
immediate parent directory <samp>/usr/local/stow</samp>), overriding any
pre-existing links to bin files or man pages, and ignoring some cruft
that gets installed by default.
</p>
<p>If an option is provided both on the command line and in a resource file,
the command line option takes precedence. For options that provide a single
value, such as <code>--target</code> or <code>--dir</code>, the command line
option will overwrite any options in the resource file. For options that can
be given more than once, <code>--ignore</code> for example, command line
options and resource options are appended together.
</p>
<p>For options that take a file path, environment variables and the tilde
character (<code>~</code>) are expanded. An environment variable can be
given in either the <code>$VAR</code> or <code>${VAR}</code> form. To
prevent expansion, escape the <code>$</code> or <code>~</code> with a
backslash.
</p>
<p>The options <code>-D</code>, <code>-S</code>, and <code>-R</code> are ignored in
resource files. This is also true of any package names given in the
resource file.
</p>
<hr>
<div class="header">
<p>
Next: <a href="Compile_002dtime-vs-Install_002dtime.html#Compile_002dtime-vs-Install_002dtime" accesskey="n" rel="next">Compile-time vs Install-time</a>, Previous: <a href="Target-Maintenance.html#Target-Maintenance" accesskey="p" rel="prev">Target Maintenance</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
